package com.example.servicebase.client;

import com.example.commonutils.ResultData;
import com.example.servicebase.entity.UrlObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "service-oss",fallbackFactory = OssClientFallbackFactory.class)
@Component
public interface OssClient {
    @DeleteMapping("/eduoss/deletePhoto/{url}")
    public ResultData deletePhoto(@PathVariable("url") String url);

    @PostMapping("/eduoss/deletePhoto")
    public ResultData deletePhoto(@RequestBody UrlObject url);
}
